home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-22 | 44.5 KB | 1,549 lines |
- This is a new archive version of TRN at patchlevel 3.
- The original posting took up Volume23, issues 60 to 73, with
- various problems. These files replace those issues.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: EXTERN.h INTERN.h Wishlist addng.h art.h artsrch.h
- # artstate.h backpage.h cheat.h final.h help.h init.h intrp.h
- # kfile.h last.c last.h makedir.SH makekit mt-lint.h newsnews.SH
- # ng.h ngdata.h ngsrch.h ngstuff.h norm.saver.SH only.h rcln.h
- # rcstuff.h respond.h rn.h search.h sw.h unipatch.c util.h
- # Wrapped by rsalz@litchi.bbn.com on Fri Aug 23 16:39:05 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 14 (of 14)."'
- if test -f 'EXTERN.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'EXTERN.h'\"
- else
- echo shar: Extracting \"'EXTERN.h'\" \(245 characters\)
- sed "s/^X//" >'EXTERN.h' <<'END_OF_FILE'
- X/* $Header: EXTERN.h,v 4.3 85/05/01 11:58:01 lwall Exp $
- X *
- X * $Log: EXTERN.h,v $
- X * Revision 4.3 85/05/01 11:58:01 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#undef EXT
- X#define EXT extern
- X
- X#undef INIT
- X#define INIT(x)
- X
- X#undef DOINIT
- END_OF_FILE
- if test 245 -ne `wc -c <'EXTERN.h'`; then
- echo shar: \"'EXTERN.h'\" unpacked with wrong size!
- fi
- # end of 'EXTERN.h'
- fi
- if test -f 'INTERN.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'INTERN.h'\"
- else
- echo shar: Extracting \"'INTERN.h'\" \(243 characters\)
- sed "s/^X//" >'INTERN.h' <<'END_OF_FILE'
- X/* $Header: INTERN.h,v 4.3 85/05/01 11:33:16 lwall Exp $
- X *
- X * $Log: INTERN.h,v $
- X * Revision 4.3 85/05/01 11:33:16 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#undef EXT
- X#define EXT
- X
- X#undef INIT
- X#define INIT(x) = x
- X
- X#define DOINIT
- END_OF_FILE
- if test 243 -ne `wc -c <'INTERN.h'`; then
- echo shar: \"'INTERN.h'\" unpacked with wrong size!
- fi
- # end of 'INTERN.h'
- fi
- if test -f 'Wishlist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Wishlist'\"
- else
- echo shar: Extracting \"'Wishlist'\" \(1595 characters\)
- sed "s/^X//" >'Wishlist' <<'END_OF_FILE'
- XGeneralized article set manipulation
- X Interface to subject listing.
- X Recursive newsgroup visitation.
- XVirtual article abstract type to allow the following:
- X Personalized header munging via % subs.
- X Undigestification.
- X Personal archive perusal.
- X Mail handling.
- XParent command (waiting for ARTFILE interface and recursive newsgroups).
- XMerge Pnews and postnews.
- XVnews duplicate suppression algorithm for sites that can't do Xref patch.
- XDynamic allocation of stuff currently restricted by MAXRCLINE.
- X (And pull parallel arrays into array of structs).
- XSeparation of .newsrc functions and newsgroup functions to separate processes
- X communicating via pipes (to make fit on non-separate-I-and-D pdp11,
- X or unreasonable facsimiles thereof).
- XFaster!!!
- XSmaller!!!
- XMore general!!!
- XPerfect?
- X----------
- X Better NNTP Support
- X
- XThe current NNTP support requires a duplicate database be maintained on each
- Xclient machine. Currently, this requires each client to run the NNTP version
- Xof mthreads to access all the articles headers to create the local copy of the
- Xthread database. There are a number of ways this could be improved:
- X
- X o Create the database on the server host and distribute the finished
- X thread files to all the client hosts at regular intervals using ftp,
- X mail, uucp, etc.
- X
- X o Write an adjunct to NNTP that would serve to distribute thread data.
- X
- X o Cajole the NNTP people to include a command to distribe an authorized
- X list of files other than news articles (e.g. thread files).
- X
- X o Eliminate the need for a thread database.
- X
- XAll these options are left as an exercise for the reader.
- END_OF_FILE
- if test 1595 -ne `wc -c <'Wishlist'`; then
- echo shar: \"'Wishlist'\" unpacked with wrong size!
- fi
- # end of 'Wishlist'
- fi
- if test -f 'addng.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'addng.h'\"
- else
- echo shar: Extracting \"'addng.h'\" \(424 characters\)
- sed "s/^X//" >'addng.h' <<'END_OF_FILE'
- X/* $Header: addng.h,v 4.3.3.1 91/01/16 02:20:45 davison Trn $
- X *
- X * $Log: addng.h,v $
- X * Revision 4.3.3.1 91/01/16 02:20:45 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:34:48 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- Xvoid addng_init ANSI((void));
- X#ifdef FINDNEWNG
- X bool newlist ANSI((bool,bool));
- X long birthof ANSI((char *,ART_NUM));
- X bool scanactive ANSI((void));
- X#endif
- END_OF_FILE
- if test 424 -ne `wc -c <'addng.h'`; then
- echo shar: \"'addng.h'\" unpacked with wrong size!
- fi
- # end of 'addng.h'
- fi
- if test -f 'art.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'art.h'\"
- else
- echo shar: Extracting \"'art.h'\" \(481 characters\)
- sed "s/^X//" >'art.h' <<'END_OF_FILE'
- X/* $Header: art.h,v 4.3.3.1 91/01/16 02:20:48 davison Trn $
- X *
- X * $Log: art.h,v $
- X * Revision 4.3.3.1 91/01/16 02:20:48 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:35:29 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X/* do_article() return values */
- X
- X#define DA_NORM 0
- X#define DA_RAISE 1
- X#define DA_CLEAN 2
- X#define DA_TOEND 3
- X
- Xvoid art_init ANSI((void));
- Xint do_article ANSI((void));
- Xint page_switch ANSI((void));
- Xbool innermore ANSI((void));
- END_OF_FILE
- if test 481 -ne `wc -c <'art.h'`; then
- echo shar: \"'art.h'\" unpacked with wrong size!
- fi
- # end of 'art.h'
- fi
- if test -f 'artsrch.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'artsrch.h'\"
- else
- echo shar: Extracting \"'artsrch.h'\" \(1120 characters\)
- sed "s/^X//" >'artsrch.h' <<'END_OF_FILE'
- X/* $Header: artsrch.h,v 4.3.3.1 91/01/16 02:21:37 davison Trn $
- X *
- X * $Log: artsrch.h,v $
- X * Revision 4.3.3.1 91/01/16 02:21:37 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:35:55 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifndef NBRA
- X#include "search.h"
- X#endif
- X
- X#ifdef ARTSEARCH
- X
- X#define SRCH_ABORT 0
- X#define SRCH_INTR 1
- X#define SRCH_FOUND 2
- X#define SRCH_NOTFOUND 3
- X#define SRCH_DONE 4
- X#define SRCH_SUBJDONE 5
- X#define SRCH_ERROR 6
- X#endif
- X
- XEXT char *lastpat INIT(nullstr); /* last search pattern */
- X#ifdef ARTSEARCH
- X EXT COMPEX sub_compex; /* last compiled subject search */
- X EXT COMPEX art_compex; /* last compiled normal search */
- X# ifdef CONDSUB
- X EXT COMPEX *bra_compex INIT(&art_compex);
- X /* current compex with brackets */
- X# endif
- X EXT char art_howmuch; /* search just the subjects */
- X EXT bool art_doread; /* search read articles? */
- X#endif
- X
- Xvoid artsrch_init ANSI((void));
- X#ifdef ARTSEARCH
- X int art_search ANSI((char *, int, int));
- X bool wanted ANSI((COMPEX *, ART_NUM, char));
- X /* return TRUE if current article matches pattern */
- X#endif
- END_OF_FILE
- if test 1120 -ne `wc -c <'artsrch.h'`; then
- echo shar: \"'artsrch.h'\" unpacked with wrong size!
- fi
- # end of 'artsrch.h'
- fi
- if test -f 'artstate.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'artstate.h'\"
- else
- echo shar: Extracting \"'artstate.h'\" \(1097 characters\)
- sed "s/^X//" >'artstate.h' <<'END_OF_FILE'
- X/* $Header: artstate.h,v 4.3.1.2 85/05/13 09:30:30 lwall Exp $
- X *
- X * $Log: artstate.h,v $
- X * Revision 4.3.1.2 85/05/13 09:30:30 lwall
- X * Added CUSTOMLINES option.
- X *
- X * Revision 4.3.1.1 85/05/10 11:31:32 lwall
- X * Branch for patches.
- X *
- X * Revision 4.3 85/05/01 11:35:59 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT bool reread INIT(FALSE); /* consider current art temporarily */
- X /* unread? */
- XEXT bool do_fseek INIT(FALSE); /* should we back up in article file? */
- X
- XEXT bool oldsubject INIT(FALSE); /* not 1st art in subject thread */
- XEXT ART_LINE topline INIT(-1); /* top line of current screen */
- XEXT bool do_hiding INIT(TRUE); /* hide header lines with -h? */
- X#ifdef ROTATION
- XEXT bool rotate INIT(FALSE); /* has rotation been requested? */
- X#endif
- XEXT char *prompt; /* pointer to current prompt */
- X
- XEXT char *firstline INIT(Nullch); /* special first line? */
- X#ifdef CUSTOMLINES
- XEXT char *hideline INIT(Nullch); /* custom line hiding? */
- XEXT char *pagestop INIT(Nullch); /* custom page terminator? */
- XEXT COMPEX hide_compex;
- XEXT COMPEX page_compex;
- X#endif
- END_OF_FILE
- if test 1097 -ne `wc -c <'artstate.h'`; then
- echo shar: \"'artstate.h'\" unpacked with wrong size!
- fi
- # end of 'artstate.h'
- fi
- if test -f 'backpage.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'backpage.h'\"
- else
- echo shar: Extracting \"'backpage.h'\" \(651 characters\)
- sed "s/^X//" >'backpage.h' <<'END_OF_FILE'
- X/* $Header: backpage.h,v 4.3.3.1 91/01/16 02:29:47 davison Trn $
- X *
- X * $Log: backpage.h,v $
- X * Revision 4.3.3.1 91/01/16 02:29:47 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:36:11 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X/* things for doing the 'back page' command */
- X
- XEXT int varyfd INIT(0); /* virtual array file for storing */
- X /* file offsets */
- XEXT ART_POS varybuf[VARYSIZE]; /* current window onto virtual array */
- X
- XEXT long oldoffset INIT(-1); /* offset to block currently in window */
- X
- Xvoid backpage_init ANSI((void));
- XART_POS vrdary ANSI((ART_LINE));
- Xvoid vwtary ANSI((ART_LINE,ART_POS));
- END_OF_FILE
- if test 651 -ne `wc -c <'backpage.h'`; then
- echo shar: \"'backpage.h'\" unpacked with wrong size!
- fi
- # end of 'backpage.h'
- fi
- if test -f 'cheat.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cheat.h'\"
- else
- echo shar: Extracting \"'cheat.h'\" \(572 characters\)
- sed "s/^X//" >'cheat.h' <<'END_OF_FILE'
- X/* $Header: cheat.h,v 4.3.3.1 91/01/16 02:32:16 davison Trn $
- X *
- X * $Log: cheat.h,v $
- X * Revision 4.3.3.1 91/01/16 02:32:16 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:36:58 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifdef ARTSEARCH
- XEXT ART_NUM srchahead INIT(0); /* are we in subject scan mode? */
- X /* (if so, contains art # found or -1) */
- X#endif
- X
- X#ifdef PENDING
- X# ifdef CACHESUBJ
- X EXT ART_NUM subj_to_get;
- X# endif
- X#endif
- X
- Xvoid cheat_init ANSI((void));
- Xvoid look_ahead ANSI((void));
- Xvoid collect_subjects ANSI((void));
- END_OF_FILE
- if test 572 -ne `wc -c <'cheat.h'`; then
- echo shar: \"'cheat.h'\" unpacked with wrong size!
- fi
- # end of 'cheat.h'
- fi
- if test -f 'final.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'final.h'\"
- else
- echo shar: Extracting \"'final.h'\" \(1022 characters\)
- sed "s/^X//" >'final.h' <<'END_OF_FILE'
- X/* $Header: final.h,v 4.3.3.2 91/01/16 02:38:16 davison Trn $
- X *
- X * $Log: final.h,v $
- X * Revision 4.3.3.2 91/01/16 02:38:16 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:37:04 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3 85/05/01 11:38:17 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X/* cleanup status for fast exits */
- X
- XEXT bool panic INIT(FALSE); /* we got hung up or something-- */
- X /* so leave tty alone */
- XEXT bool rc_changed INIT(FALSE); /* need we rewrite .newsrc? */
- XEXT bool doing_ng INIT(FALSE); /* do we need to reconstitute */
- X /* current rc line? */
- X
- XEXT char int_count INIT(0); /* how many interrupts we've had */
- X
- XEXT bool clear_on_stop INIT(FALSE); /* set when handling the stop signal */
- X /* would leave the screen a mess */
- X
- X/* signal catching routines */
- X
- XSIGRET int_catcher ANSI((void));
- XSIGRET sig_catcher ANSI((int));
- X#ifdef SIGTSTP
- X SIGRET stop_catcher ANSI((int));
- X#endif
- X
- Xvoid final_init ANSI((void));
- Xvoid finalize ANSI((int));
- END_OF_FILE
- if test 1022 -ne `wc -c <'final.h'`; then
- echo shar: \"'final.h'\" unpacked with wrong size!
- fi
- # end of 'final.h'
- fi
- if test -f 'help.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help.h'\"
- else
- echo shar: Extracting \"'help.h'\" \(556 characters\)
- sed "s/^X//" >'help.h' <<'END_OF_FILE'
- X/* $Header: help.h,v 4.3.3.2 91/01/16 02:41:20 davison Trn $
- X *
- X * $Log: help.h,v $
- X * Revision 4.3.3.2 91/01/16 02:41:20 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:37:34 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3 85/05/01 11:39:19 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- Xvoid help_init ANSI((void));
- Xint help_ng ANSI((void));
- Xint help_art ANSI((void));
- Xint help_page ANSI((void));
- X#ifdef ESCSUBS
- X int help_subs ANSI((void));
- X#endif
- X#ifdef USETHREADS
- X int help_select ANSI((void));
- X#endif
- END_OF_FILE
- if test 556 -ne `wc -c <'help.h'`; then
- echo shar: \"'help.h'\" unpacked with wrong size!
- fi
- # end of 'help.h'
- fi
- if test -f 'init.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'init.h'\"
- else
- echo shar: Extracting \"'init.h'\" \(393 characters\)
- sed "s/^X//" >'init.h' <<'END_OF_FILE'
- X/* $Header: init.h,v 4.3.3.1 91/01/16 02:43:40 davison Trn $
- X *
- X * $Log: init.h,v $
- X * Revision 4.3.3.1 91/01/16 02:43:40 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:40:46 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *lockname INIT(nullstr);
- X
- Xbool initialize ANSI((int,char **));
- Xvoid lock_check ANSI((void));
- Xvoid newsnews_check ANSI((void));
- END_OF_FILE
- if test 393 -ne `wc -c <'init.h'`; then
- echo shar: \"'init.h'\" unpacked with wrong size!
- fi
- # end of 'init.h'
- fi
- if test -f 'intrp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'intrp.h'\"
- else
- echo shar: Extracting \"'intrp.h'\" \(1080 characters\)
- sed "s/^X//" >'intrp.h' <<'END_OF_FILE'
- X/* $Header: intrp.h,v 4.3.3.2 91/01/16 02:43:45 davison Trn $
- X *
- X * $Log: intrp.h,v $
- X * Revision 4.3.3.2 91/01/16 02:43:45 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:38:00 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3 85/05/01 11:41:48 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *lib INIT(Nullch); /* news library */
- XEXT char *rnlib INIT(Nullch); /* private news program library */
- XEXT char *origdir INIT(Nullch); /* cwd when rn invoked */
- XEXT char *homedir INIT(Nullch); /* login directory */
- XEXT char *dotdir INIT(Nullch); /* where . files go */
- XEXT char *logname INIT(Nullch); /* login id */
- XEXT char *sitename INIT(Nullch); /* host name */
- XEXT int perform_cnt;
- X
- X#ifdef NEWSADMIN
- X EXT char newsadmin[] INIT(NEWSADMIN);/* news administrator */
- X EXT int newsuid INIT(0);
- X#endif
- X
- Xvoid intrp_init ANSI((char *));
- Xchar *filexp ANSI((char *));
- Xchar *dointerp ANSI((char *,int,char *,char *));
- Xvoid interp ANSI((char *,int,char *));
- Xvoid refscpy ANSI((char *,int,char *));
- Xchar *getrealname ANSI((int));
- END_OF_FILE
- if test 1080 -ne `wc -c <'intrp.h'`; then
- echo shar: \"'intrp.h'\" unpacked with wrong size!
- fi
- # end of 'intrp.h'
- fi
- if test -f 'kfile.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'kfile.h'\"
- else
- echo shar: Extracting \"'kfile.h'\" \(720 characters\)
- sed "s/^X//" >'kfile.h' <<'END_OF_FILE'
- X/* $Header: kfile.h,v 4.3.3.1 91/01/16 02:46:29 davison Trn $
- X *
- X * $Log: kfile.h,v $
- X * Revision 4.3.3.1 91/01/16 02:46:29 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:42:00 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#define KF_GLOBAL 0
- X#define KF_LOCAL 1
- X
- X#ifdef KILLFILES
- XEXT FILE *globkfp INIT(Nullfp); /* global article killer file */
- XEXT FILE *localkfp INIT(Nullfp); /* local (for this newsgroup) */
- X /* article killer file */
- X#endif
- X
- Xvoid kfile_init ANSI((void));
- Xint do_kfile ANSI((FILE *,int));
- Xvoid kill_unwanted ANSI((ART_NUM,char *,int));
- Xint edit_kfile ANSI((void));
- Xvoid open_kfile ANSI((int));
- Xvoid kf_append ANSI((char *));
- Xvoid setthru ANSI((ART_NUM));
- END_OF_FILE
- if test 720 -ne `wc -c <'kfile.h'`; then
- echo shar: \"'kfile.h'\" unpacked with wrong size!
- fi
- # end of 'kfile.h'
- fi
- if test -f 'last.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'last.c'\"
- else
- echo shar: Extracting \"'last.c'\" \(1405 characters\)
- sed "s/^X//" >'last.c' <<'END_OF_FILE'
- X/* $Header: last.c,v 4.3.3.1 91/01/16 02:47:15 davison Trn $
- X *
- X * $Log: last.c,v $
- X * Revision 4.3.3.1 91/01/16 02:47:15 davison
- X * Integrated rn patches 48-54.
- X *
- X * Revision 4.3.2.1 89/12/20 23:23:07 sob
- X * .rnlast sometimes is a null file. This gives bogus information when
- X * restarting rn following an abnormal termination. This bug was reported
- X * by weening@gang-of-four.stanford.edu
- X *
- X * Revision 4.3 85/05/01 11:42:16 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#include "EXTERN.h"
- X#include "common.h"
- X#include "rn.h"
- X#include "util.h"
- X#include "intrp.h"
- X#include "INTERN.h"
- X#include "last.h"
- X
- Xchar *lastname = Nullch; /* path name of .rnlast file */
- X
- Xvoid
- Xlast_init(tcbuf)
- Xchar *tcbuf;
- X{
- X lastname = savestr(filexp(LASTNAME));
- X if ((tmpfp = fopen(lastname,"r")) != Nullfp &&
- X fgets(tcbuf,1024,tmpfp) != Nullch) {
- X tcbuf[strlen(tcbuf)-1] = '\0';
- X lastngname = savestr(tcbuf);
- X fgets(tcbuf,1024,tmpfp);
- X lasttime = atol(tcbuf);
- X fgets(tcbuf,1024,tmpfp);
- X lastactsiz = atol(tcbuf);
- X fclose(tmpfp);
- X }
- X else {
- X lastngname = nullstr;
- X lasttime = 0;
- X lastactsiz = 0;
- X }
- X}
- X
- X/* put out certain values for next run of rn */
- X
- Xvoid
- Xwritelast()
- X{
- X if ((tmpfp = fopen(lastname,"w")) != Nullfp) {
- X fprintf(tmpfp,"%s\n%ld\n%ld\n",
- X (ngname==Nullch?nullstr:ngname),(long)lasttime,(long)lastactsiz);
- X fclose(tmpfp);
- X }
- X else
- X printf(cantcreate,lastname) FLUSH;
- X}
- END_OF_FILE
- if test 1405 -ne `wc -c <'last.c'`; then
- echo shar: \"'last.c'\" unpacked with wrong size!
- fi
- # end of 'last.c'
- fi
- if test -f 'last.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'last.h'\"
- else
- echo shar: Extracting \"'last.h'\" \(541 characters\)
- sed "s/^X//" >'last.h' <<'END_OF_FILE'
- X/* $Header: last.h,v 4.3.3.1 91/01/16 02:47:16 davison Trn $
- X *
- X * $Log: last.h,v $
- X * Revision 4.3.3.1 91/01/16 02:47:16 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:42:22 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *lastngname INIT(Nullch); /* last newsgroup read, from .rnlast file */
- XEXT long lasttime INIT(0); /* time last rn was started up */
- XEXT long lastactsiz INIT(0); /* size of active file when rn last started up */
- X
- Xvoid last_init ANSI((char *));
- Xvoid writelast ANSI((void));
- END_OF_FILE
- if test 541 -ne `wc -c <'last.h'`; then
- echo shar: \"'last.h'\" unpacked with wrong size!
- fi
- # end of 'last.h'
- fi
- if test -f 'makedir.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'makedir.SH'\"
- else
- echo shar: Extracting \"'makedir.SH'\" \(1263 characters\)
- sed "s/^X//" >'makedir.SH' <<'END_OF_FILE'
- Xcase $CONFIG in
- X '') . ./config.sh ;;
- Xesac
- Xecho "Extracting makedir (with variable substitutions)"
- X$spitshell >makedir <<!GROK!THIS!
- X$startsh
- X# $Header: makedir.SH,v 4.3.3.1 91/01/16 02:48:09 davison Trn $
- X#
- X# $Log: makedir.SH,v $
- X# Revision 4.3.3.1 91/01/16 02:48:09 davison
- X# Integrated rn patches 48-54.
- X#
- X# Revision 4.3.2.1 90/11/22 14:02:49 sob
- X# changes . config.sh to . ./config.sh
- X#
- X# Revision 4.3 85/05/01 11:42:31 lwall
- X# Baseline for release with 4.3bsd.
- X#
- X
- Xexport PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
- X
- Xcase \$# in
- X 0)
- X $echo "makedir pathname filenameflag"
- X exit 1
- X ;;
- Xesac
- X
- X: guarantee one slash before 1st component
- Xcase \$1 in
- X /*) ;;
- X *) set ./\$1 \$2 ;;
- Xesac
- X
- X: strip last component if it is to be a filename
- Xcase X\$2 in
- X X1) set \`$echo \$1 | $sed 's:\(.*\)/[^/]*\$:\1:'\` ;;
- X *) set \$1 ;;
- Xesac
- X
- X: return reasonable status if nothing to be created
- Xif $test -d "\$1" ; then
- X exit 0
- Xfi
- X
- Xlist=''
- Xwhile true ; do
- X case \$1 in
- X */*)
- X list="\$1 \$list"
- X set \`echo \$1 | $sed 's:\(.*\)/:\1 :'\`
- X ;;
- X *)
- X break
- X ;;
- X esac
- Xdone
- X
- Xset \$list
- X
- Xfor dir do
- X $mkdir \$dir >/dev/null 2>&1
- Xdone
- X!GROK!THIS!
- X$eunicefix makedir
- Xchmod 755 makedir
- END_OF_FILE
- if test 1263 -ne `wc -c <'makedir.SH'`; then
- echo shar: \"'makedir.SH'\" unpacked with wrong size!
- fi
- chmod +x 'makedir.SH'
- # end of 'makedir.SH'
- fi
- if test -f 'makekit' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'makekit'\"
- else
- echo shar: Extracting \"'makekit'\" \(745 characters\)
- sed "s/^X//" >'makekit' <<'END_OF_FILE'
- X#!/bin/sh
- X# $Header: makekit,v 4.3 85/05/01 11:42:38 lwall Exp $
- X#
- X# $Log: makekit,v $
- X# Revision 4.3 85/05/01 11:42:38 lwall
- X# Baseline for release with 4.3bsd.
- X#
- X
- Xnumkits=$#
- Xfor kitlist in $*; do
- X kit=`basename $kitlist .list`
- X kitnum=`expr "$kit" : 'kit\([0-9][0-9]*\)'`
- X echo "*** Making $kit ***"
- X kitleader "$kit" "$kitnum" "$numkits"
- X for file in `/bin/cat $kitlist`; do
- X echo $file
- X echo "echo Extracting $file" >> $kit
- X if egrep '^\.$' $file; then
- X echo "sed >$file <<'!STUFFY!FUNK!' -e 's/X//'" >> $kit
- X sed <$file >>$kit -e 's/^/X/'
- X else
- X echo "cat >$file <<'!STUFFY!FUNK!'" >> $kit
- X /bin/cat $file >> $kit
- X fi
- X echo "!STUFFY!FUNK!" >> $kit
- X done
- X kittrailer "$kit" "$kitnum" "$numkits"
- Xdone
- END_OF_FILE
- if test 745 -ne `wc -c <'makekit'`; then
- echo shar: \"'makekit'\" unpacked with wrong size!
- fi
- chmod +x 'makekit'
- # end of 'makekit'
- fi
- if test -f 'mt-lint.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mt-lint.h'\"
- else
- echo shar: Extracting \"'mt-lint.h'\" \(1542 characters\)
- sed "s/^X//" >'mt-lint.h' <<'END_OF_FILE'
- X/* $Header: mt-lint.h,v 4.3.3.2 91/01/16 02:49:11 davison Trn $
- X**
- X** $Log: mt-lint.h,v $
- X** Revision 4.3.3.2 91/01/16 02:49:11 davison
- X** Changed Free() to safefree().
- X**
- X** Revision 4.3.3.1 90/06/20 22:55:11 davison
- X** Initial Trn Release
- X**
- X** Handle brain-dead lints that only have 6 significant-character names.
- X*/
- X
- X#define subject_cnts sucnts
- X#define subject_array suarra
- X#define subject_strings sustri
- X#define subject_str sustr
- X#define author_cnts aucnts
- X#define author_array auarra
- X#define author_root auroot
- X#define author_str austr
- X#define valid_subject vsubje
- X#define valid_author vautho
- X#define valid_message_id vmsgid
- X#define read_authors rautho
- X#define read_articles rartic
- X#define read_ids rids
- X#define read_item ritem
- X#define processed_groups pgroup
- X#define process_articles partic
- X#define expired_articles eartic
- X#define unlink_child uchild
- X#define unlink_root uroot
- X#define free_article fartic
- X#define free_author fautho
- X#define enumerate_articles enarti
- X#define enumerate_thread enthrd
- X#define string_offset soffst
- X#define write_authors wautho
- X#define write_subjects wsubje
- X#define write_roots wroots
- X#define write_articles wartic
- X#define write_thread wthred
- X#define write_ids wids
- X#define write_item witem
- X#define processed_groups pgroup
- X#define timer_off timoff
- X#define timer_first tim1st
- X#define timer_next timnxt
- X#define truncate_len trulen
- X#define article_array artarr
- X
- X#define safemalloc(x) (NULL)
- X#define free(x) (x = NULL)
- X#define safefree(x) (*x = NULL)
- X#define signal(x,y)
- END_OF_FILE
- if test 1542 -ne `wc -c <'mt-lint.h'`; then
- echo shar: \"'mt-lint.h'\" unpacked with wrong size!
- fi
- # end of 'mt-lint.h'
- fi
- if test -f 'newsnews.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'newsnews.SH'\"
- else
- echo shar: Extracting \"'newsnews.SH'\" \(1299 characters\)
- sed "s/^X//" >'newsnews.SH' <<'END_OF_FILE'
- Xcase $CONFIG in
- X '') . ./config.sh ;;
- Xesac
- Xecho "Extracting newsnews (with variable substitutions)"
- Xcat >newsnews <<!GROK!THIS!
- X *** NEWS NEWS ***
- X
- XWelcome to trn. There are more options to trn than you want to think about,
- Xso we won't list them here. If you want to find out about them, read the
- Xtrn manual page. There are some important things to remember, though:
- X
- X * Trn is an extention to rn. Where possible, the command syntax is the same.
- X * To access all the new features, specify the options -x and -X. These
- X options MAY be on by default, but it won't hurt to be redundant.
- X * At ANY prompt in trn, you may type 'h' for help. There are many different
- X help menus, depending on where you are. Typing <esc>h in the
- X middle of a multi-character command will list escape substitutions.
- X * Typing a space to any prompt means to do the normal thing. You could
- X spend all day reading news and never hit anything but the space bar.
- X
- XThis particular message comes from $rnlib/newsnews. You will only
- Xsee it once. Your news administrator should feel free to substitute his or
- Xher own message whenever something new happens to trn, and then the file
- Xwill again be displayed, just once for each person.
- X
- XWayne Davison davison@borland.com
- X!GROK!THIS!
- X$eunicefix newsnews
- END_OF_FILE
- if test 1299 -ne `wc -c <'newsnews.SH'`; then
- echo shar: \"'newsnews.SH'\" unpacked with wrong size!
- fi
- chmod +x 'newsnews.SH'
- # end of 'newsnews.SH'
- fi
- if test -f 'ng.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ng.h'\"
- else
- echo shar: Extracting \"'ng.h'\" \(1087 characters\)
- sed "s/^X//" >'ng.h' <<'END_OF_FILE'
- X/* $Header: ng.h,v 4.3.3.1 91/01/16 03:18:20 davison Trn $
- X *
- X * $Log: ng.h,v $
- X * Revision 4.3.3.1 91/01/16 03:18:20 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:44:29 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT ART_NUM art INIT(0); /* current or prospective article # */
- X
- XEXT int checkcount INIT(0); /* how many articles have we read */
- X /* in the current newsgroup since */
- X /* the last checkpoint? */
- XEXT int docheckwhen INIT(20); /* how often to do checkpoint */
- X
- X#ifdef MAILCALL
- XEXT int mailcount INIT(0); /* check for mail when 0 mod 10 */
- X#endif
- XEXT char *mailcall INIT(nullstr);
- X
- XEXT bool forcelast INIT(FALSE); /* ought we show "End of newsgroup"? */
- XEXT bool forcegrow INIT(FALSE); /* do we want to recalculate size */
- X /* of newsgroup, e.g. after posting? */
- X
- X#define NG_ERROR -1
- X#define NG_NORM 0
- X#define NG_ASK 1
- X#define NG_MINUS 2
- X
- Xvoid ng_init ANSI((void));
- Xint do_newsgroup ANSI((char *));
- Xint art_switch ANSI((void));
- X#ifdef MAILCALL
- X void setmail ANSI((void));
- X#endif
- Xvoid setdfltcmd ANSI((void));
- END_OF_FILE
- if test 1087 -ne `wc -c <'ng.h'`; then
- echo shar: \"'ng.h'\" unpacked with wrong size!
- fi
- # end of 'ng.h'
- fi
- if test -f 'ngdata.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngdata.h'\"
- else
- echo shar: Extracting \"'ngdata.h'\" \(1141 characters\)
- sed "s/^X//" >'ngdata.h' <<'END_OF_FILE'
- X/* $Header: ngdata.h,v 4.3.3.2 91/01/16 03:18:22 davison Trn $
- X *
- X * $Log: ngdata.h,v $
- X * Revision 4.3.3.2 91/01/16 03:18:22 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:38:50 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3.2.1 89/11/06 00:41:21 sob
- X * Added RRN support from NNTP 1.5
- X *
- X * Revision 4.3 85/05/01 11:44:48 lwall
- X * added to local RCS
- X *
- X * Revision 4.3 85/05/01 11:44:48 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT FILE *actfp INIT(Nullfp); /* the active file */
- XEXT bool writesoft INIT(FALSE); /* rewrite the soft pointer file? */
- XEXT int softtries INIT(0), softmisses INIT(0);
- X
- X#ifdef SERVER
- X EXT char active_name[256];
- X#endif
- X
- X#ifdef CACHEFIRST
- X EXT ART_NUM abs1st[MAXRCLINE]; /* 1st real article in newsgroup */
- X#else
- X# ifdef MININACT
- X EXT ART_NUM abs1st INIT(0);
- X# endif
- X#endif
- X
- XEXT char *moderated;
- X#ifdef USETHREADS
- XEXT bool ThreadedGroup;
- X#endif
- X
- Xvoid ngdata_init ANSI((void));
- XART_NUM getngsize ANSI((NG_NUM));
- XACT_POS findact ANSI((char *,char *,int,long));
- XART_NUM getabsfirst ANSI((NG_NUM,ART_NUM));
- XART_NUM getngmin ANSI((char *,ART_NUM));
- END_OF_FILE
- if test 1141 -ne `wc -c <'ngdata.h'`; then
- echo shar: \"'ngdata.h'\" unpacked with wrong size!
- fi
- # end of 'ngdata.h'
- fi
- if test -f 'ngsrch.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngsrch.h'\"
- else
- echo shar: Extracting \"'ngsrch.h'\" \(635 characters\)
- sed "s/^X//" >'ngsrch.h' <<'END_OF_FILE'
- X/* $Header: ngsrch.h,v 4.3.3.1 91/01/16 03:18:24 davison Trn $
- X *
- X * $Log: ngsrch.h,v $
- X * Revision 4.3.3.1 91/01/16 03:18:24 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:44:56 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifdef NGSEARCH
- X#define NGS_ABORT 0
- X#define NGS_FOUND 1
- X#define NGS_INTR 2
- X#define NGS_NOTFOUND 3
- X
- XEXT bool ng_doread INIT(FALSE); /* search read newsgroups? */
- X#endif
- X
- Xvoid ngsrch_init ANSI((void));
- X#ifdef NGSEARCH
- X int ng_search ANSI((char *,int));
- X bool ng_wanted ANSI((void));
- X#endif
- X#ifdef NGSORONLY
- X char *ng_comp ANSI((COMPEX *,char *,bool,bool));
- X#endif
- END_OF_FILE
- if test 635 -ne `wc -c <'ngsrch.h'`; then
- echo shar: \"'ngsrch.h'\" unpacked with wrong size!
- fi
- # end of 'ngsrch.h'
- fi
- if test -f 'ngstuff.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngstuff.h'\"
- else
- echo shar: Extracting \"'ngstuff.h'\" \(685 characters\)
- sed "s/^X//" >'ngstuff.h' <<'END_OF_FILE'
- X/* $Header: ngstuff.h,v 4.3.3.2 91/01/16 03:18:27 davison Trn $
- X *
- X * $Log: ngstuff.h,v $
- X * Revision 4.3.3.2 91/01/16 03:18:27 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:39:07 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3 85/05/01 11:45:12 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#define NN_NORM 0
- X#define NN_INP 1
- X#define NN_REREAD 2
- X#define NN_ASK 3
- X
- XEXT bool one_command INIT(FALSE); /* no ':' processing in perform() */
- X
- Xvoid ngstuff_init ANSI((void));
- Xint escapade ANSI((void));
- Xint switcheroo ANSI((void));
- Xint numnum ANSI((void));
- Xint perform ANSI((char *,int));
- X#ifdef USETHREADS
- Xint use_selected ANSI((void));
- X#endif
- END_OF_FILE
- if test 685 -ne `wc -c <'ngstuff.h'`; then
- echo shar: \"'ngstuff.h'\" unpacked with wrong size!
- fi
- # end of 'ngstuff.h'
- fi
- if test -f 'norm.saver.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'norm.saver.SH'\"
- else
- echo shar: Extracting \"'norm.saver.SH'\" \(1134 characters\)
- sed "s/^X//" >'norm.saver.SH' <<'END_OF_FILE'
- Xcase $CONFIG in
- X '') . ./config.sh ;;
- Xesac
- Xecho "Extracting norm.saver (with variable substitutions)"
- X$spitshell >norm.saver <<!GROK!THIS!
- X$startsh
- X# $Header: norm.saver.SH,v 4.3.2.2 90/11/22 15:44:06 sob Exp $
- X#
- X# $Log: norm.saver.SH,v $
- X# Revision 4.3.2.2 90/11/22 15:44:06 sob
- X# Changed . config.sh to . ./config.sh
- X#
- X# Revision 4.3.2.1 89/11/28 00:08:01 sob
- X# Branch for RN/RRN combo.
- X#
- X# Revision 4.3.1.2 85/05/20 15:56:24 lwall
- X# Turned $5 into \$5.
- X#
- X# Revision 4.3.1.1 85/05/10 11:36:52 lwall
- X# Branch for patches.
- X#
- X# Revision 4.3 85/05/01 11:45:16 lwall
- X# Baseline for release with 4.3bsd.
- X#
- X#
- X# Arguments:
- X# 1 Full name of article (%A)
- X# 2 Public news spool directory (%P)
- X# 3 Directory of current newsgroup (%c)
- X# 4 Article number (%a)
- X# 5 Where in article to start (%B)
- X# 6 Newsgroup name (%C)
- X# 7 Save destination (%b)
- X#
- Xexport PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
- X
- X( case "\$5" in
- X 0) $echo "Article \$4 of \$6:" ;;
- X esac
- X $tail +\$5c \$1
- X $echo ""
- X $echo "" ) >> \$7
- X!GROK!THIS!
- X$eunicefix norm.saver
- Xchmod 755 norm.saver
- END_OF_FILE
- if test 1134 -ne `wc -c <'norm.saver.SH'`; then
- echo shar: \"'norm.saver.SH'\" unpacked with wrong size!
- fi
- chmod +x 'norm.saver.SH'
- # end of 'norm.saver.SH'
- fi
- if test -f 'only.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'only.h'\"
- else
- echo shar: Extracting \"'only.h'\" \(800 characters\)
- sed "s/^X//" >'only.h' <<'END_OF_FILE'
- X/* $Header: only.h,v 4.3.3.1 91/01/16 03:26:16 davison Trn $
- X *
- X * $Log: only.h,v $
- X * Revision 4.3.3.1 91/01/16 03:26:16 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:45:27 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifndef NBRA
- X#include "search.h"
- X#endif
- X
- X#ifdef ONLY
- X EXT char *ngtodo[NGMAX]; /* restrictions in effect */
- X# ifdef SPEEDOVERMEM
- X EXT COMPEX *compextodo[NGMAX]; /* restrictions in compiled form */
- X# endif
- X#endif
- X
- XEXT int maxngtodo INIT(0); /* 0 => no restrictions */
- X /* >0 => # of entries in ngtodo */
- X
- Xvoid only_init ANSI((void));
- Xbool inlist ANSI((char *)); /* return TRUE if ngname is in command line list */
- X /* or if there was no list */
- Xvoid setngtodo ANSI((char *));
- X#ifdef ONLY
- X void end_only ANSI((void));
- X#endif
- END_OF_FILE
- if test 800 -ne `wc -c <'only.h'`; then
- echo shar: \"'only.h'\" unpacked with wrong size!
- fi
- # end of 'only.h'
- fi
- if test -f 'rcln.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rcln.h'\"
- else
- echo shar: Extracting \"'rcln.h'\" \(727 characters\)
- sed "s/^X//" >'rcln.h' <<'END_OF_FILE'
- X/* $Header: rcln.h,v 4.3.3.2 91/01/16 03:28:33 davison Trn $
- X *
- X * $Log: rcln.h,v $
- X * Revision 4.3.3.2 91/01/16 03:28:33 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/08/20 16:47:22 davison
- X * Removed ngmax array.
- X *
- X * Revision 4.3 85/05/01 11:45:52 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#if defined(DEBUGGING) && !defined(USETHREADS)
- XEXT ART_NUM ngmax[MAXRCLINE];
- X#endif
- X
- Xvoid rcln_init ANSI((void));
- X#ifdef CATCHUP
- X void catch_up ANSI((NG_NUM));
- X#endif
- Xint addartnum ANSI((ART_NUM,char *));
- X#ifdef MCHASE
- X void subartnum ANSI((ART_NUM,char *));
- X#endif
- Xvoid prange ANSI((char *,ART_NUM,ART_NUM));
- Xvoid set_toread ANSI((NG_NUM));
- Xvoid checkexpired ANSI((NG_NUM,ART_NUM));
- END_OF_FILE
- if test 727 -ne `wc -c <'rcln.h'`; then
- echo shar: \"'rcln.h'\" unpacked with wrong size!
- fi
- # end of 'rcln.h'
- fi
- if test -f 'rcstuff.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rcstuff.h'\"
- else
- echo shar: Extracting \"'rcstuff.h'\" \(1543 characters\)
- sed "s/^X//" >'rcstuff.h' <<'END_OF_FILE'
- X/* $Header: rcstuff.h,v 4.3.3.1 91/01/16 03:28:37 davison Trn $
- X *
- X * $Log: rcstuff.h,v $
- X * Revision 4.3.3.1 91/01/16 03:28:37 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:46:49 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *rcline[MAXRCLINE];/* pointers to lines of .newsrc */
- XEXT ART_UNREAD toread[MAXRCLINE];
- X /* number of articles to be read in newsgroup */
- X /* <0 => invalid or unsubscribed newsgroup */
- X#define TR_ONE ((ART_UNREAD) 1)
- X#define TR_NONE ((ART_UNREAD) 0)
- X#define TR_UNSUB ((ART_UNREAD) -1)
- X /* keep this one as -1, some tests use >= TR_UNSUB */
- X#define TR_BOGUS ((ART_UNREAD) -2)
- X#define TR_JUNK ((ART_UNREAD) -3)
- X
- XEXT char rcchar[MAXRCLINE]; /* holds the character : or ! while spot is \0 */
- XEXT char rcnums[MAXRCLINE]; /* offset from rcline to numbers on line */
- XEXT ACT_POS softptr[MAXRCLINE];
- X /* likely ptr to active file entry for newsgroup */
- XEXT bool paranoid INIT(FALSE); /* did we detect some inconsistency in .newsrc? */
- X
- Xbool rcstuff_init ANSI((void));
- Xbool get_ng ANSI((char *,bool)); /* return TRUE if newsgroup can be found or added */
- XNG_NUM add_newsgroup ANSI((char *,char));
- X#ifdef RELOCATE
- X NG_NUM relocate_newsgroup ANSI((NG_NUM,NG_NUM));/* move newsgroup around */
- X#endif
- Xvoid list_newsgroups ANSI((void));
- XNG_NUM find_ng ANSI((char *)); /* return index of newsgroup */
- Xvoid cleanup_rc ANSI((void));
- Xvoid sethash ANSI((NG_NUM));
- Xint hash ANSI((char *));
- Xvoid newsrc_check ANSI((void));
- Xvoid write_rc ANSI((void));
- Xvoid get_old_rc ANSI((void));
- END_OF_FILE
- if test 1543 -ne `wc -c <'rcstuff.h'`; then
- echo shar: \"'rcstuff.h'\" unpacked with wrong size!
- fi
- # end of 'rcstuff.h'
- fi
- if test -f 'respond.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'respond.h'\"
- else
- echo shar: Extracting \"'respond.h'\" \(753 characters\)
- sed "s/^X//" >'respond.h' <<'END_OF_FILE'
- X/* $Header: respond.h,v 4.3.3.2 91/01/16 03:28:41 davison Trn $
- X *
- X * $Log: respond.h,v $
- X * Revision 4.3.3.2 91/01/16 03:28:41 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3.3.1 90/06/20 22:39:54 davison
- X * Initial Trn Release
- X *
- X * Revision 4.3 85/05/01 11:47:50 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *savedest INIT(Nullch); /* value of %b */
- XEXT char *extractprog INIT(Nullch); /* value of %e */
- XEXT ART_POS savefrom INIT(0); /* value of %B */
- XEXT char *headname INIT(Nullch);
- X
- X#define SAVE_ABORT 0
- X#define SAVE_DONE 1
- X
- Xvoid respond_init ANSI((void));
- Xint save_article ANSI((void));
- Xint cancel_article ANSI((void));
- Xvoid reply ANSI((void));
- Xvoid followup ANSI((void));
- Xvoid invoke ANSI((char *,char *));
- END_OF_FILE
- if test 753 -ne `wc -c <'respond.h'`; then
- echo shar: \"'respond.h'\" unpacked with wrong size!
- fi
- # end of 'respond.h'
- fi
- if test -f 'rn.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rn.h'\"
- else
- echo shar: Extracting \"'rn.h'\" \(958 characters\)
- sed "s/^X//" >'rn.h' <<'END_OF_FILE'
- X/* $Header: rn.h,v 4.3.3.1 91/01/16 03:28:44 davison Trn $
- X *
- X * $Log: rn.h,v $
- X * Revision 4.3.3.1 91/01/16 03:28:44 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:48:19 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT char *ngname INIT(Nullch); /* name of current newsgroup */
- XEXT int ngnlen INIT(0); /* current malloced size of ngname */
- XEXT char *ngdir INIT(Nullch); /* same thing in directory name form */
- XEXT int ngdlen INIT(0); /* current malloced size of ngdir */
- X
- XEXT NG_NUM ng INIT(0); /* current newsgroup index into rcline and toread */
- XEXT NG_NUM current_ng INIT(0); /* stable current newsgroup so we can ditz with ng */
- XEXT NG_NUM starthere INIT(0); /* set to the first newsgroup with unread news on startup */
- XEXT char *spool INIT(Nullch); /* public news spool directory */
- X
- Xvoid rn_init ANSI((void));
- Xvoid main ANSI((int,char **));
- Xvoid set_ngname ANSI((char *));
- Xchar *getngdir ANSI((char *));
- END_OF_FILE
- if test 958 -ne `wc -c <'rn.h'`; then
- echo shar: \"'rn.h'\" unpacked with wrong size!
- fi
- # end of 'rn.h'
- fi
- if test -f 'search.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'search.h'\"
- else
- echo shar: Extracting \"'search.h'\" \(1354 characters\)
- sed "s/^X//" >'search.h' <<'END_OF_FILE'
- X/* $Header: search.h,v 4.3.3.1 91/01/16 03:37:37 davison Trn $
- X *
- X * $Log: search.h,v $
- X * Revision 4.3.3.1 91/01/16 03:37:37 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:50:46 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifndef NBRA
- X#define NBRA 10 /* the maximum number of meta-brackets in an
- X RE -- \( \) */
- X#define NALTS 10 /* the maximum number of \|'s */
- X
- Xtypedef struct {
- X char *expbuf; /* The compiled search string */
- X int eblen; /* Length of above buffer */
- X char *alternatives[NALTS]; /* The list of \| seperated alternatives */
- X char *braslist[NBRA]; /* RE meta-bracket start list */
- X char *braelist[NBRA]; /* RE meta-bracket end list */
- X char *brastr; /* saved match string after execute() */
- X char nbra; /* The number of meta-brackets int the most
- X recenlty compiled RE */
- X bool do_folding; /* fold upper and lower case? */
- X} COMPEX;
- X
- Xvoid search_init ANSI((void));
- Xvoid init_compex ANSI((COMPEX *));
- Xvoid free_compex ANSI((COMPEX *));
- Xchar *getbracket ANSI((COMPEX *,int));
- Xvoid case_fold ANSI((int));
- Xchar *compile ANSI((COMPEX *,char *,int,int));
- Xvoid grow_eb ANSI((COMPEX *));
- Xchar *execute ANSI((COMPEX *,char *));
- Xbool advance ANSI((COMPEX *,char *,char *));
- Xbool backref ANSI((COMPEX *,int,char *));
- Xbool cclass ANSI((char *,int,int));
- X#endif
- END_OF_FILE
- if test 1354 -ne `wc -c <'search.h'`; then
- echo shar: \"'search.h'\" unpacked with wrong size!
- fi
- # end of 'search.h'
- fi
- if test -f 'sw.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sw.h'\"
- else
- echo shar: Extracting \"'sw.h'\" \(513 characters\)
- sed "s/^X//" >'sw.h' <<'END_OF_FILE'
- X/* $Header: sw.h,v 4.3.3.1 91/01/16 03:37:39 davison Trn $
- X *
- X * $Log: sw.h,v $
- X * Revision 4.3.3.1 91/01/16 03:37:39 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:51:07 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- X#ifdef INNERSEARCH
- XEXT int gline INIT(0);
- X#endif
- X
- Xvoid sw_init ANSI((int,char **,char **));
- Xvoid sw_file ANSI((char **,bool));
- Xvoid sw_list ANSI((char *));
- Xvoid decode_switch ANSI((char *));
- Xvoid pr_switches ANSI((void));
- Xvoid cwd_check ANSI((void));
- END_OF_FILE
- if test 513 -ne `wc -c <'sw.h'`; then
- echo shar: \"'sw.h'\" unpacked with wrong size!
- fi
- # end of 'sw.h'
- fi
- if test -f 'unipatch.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unipatch.c'\"
- else
- echo shar: Extracting \"'unipatch.c'\" \(1338 characters\)
- sed "s/^X//" >'unipatch.c' <<'END_OF_FILE'
- X/*
- XA filter to turn a unidiff into a degenerate context diff (no '!'s)
- Xfor patch. Author: davison@borland.com
- X*/
- X#include <stdio.h>
- X#define ERR(a) {fputs(a,stderr);exit(1);}
- Xstruct Ln {
- X struct Ln *lk;
- X char t;
- X char s[1];
- X} r,*h,*ln;
- Xchar *malloc();
- Xmain()
- X{
- Xchar bf[2048],*cp,ch;
- Xlong os,ol,ns,nl,ne,lncnt=0;
- Xfor(;;){
- X for(;;){
- X if(!fgets(bf,sizeof bf,stdin)) exit(0);
- X lncnt++;
- X if(!strncmp(bf,"@@ -",4)) break;
- X fputs(bf,stdout);
- X }
- X if(sscanf(bf+4,"%ld,%ld +%ld,%ld %c",&os,&ol,&ns,&nl,&ch)!=5||ch!='@')
- X goto bad;
- X r.lk=0, h= &r, ne=ns+nl-1;
- X printf("***************\n*** %ld,%ld ****\n",os,os+ol-(os>0));
- X while(ol||nl){
- X if(!fgets(bf,sizeof bf,stdin)){
- X if(nl>2) ERR("Unexpected end of file.\n");
- X strcpy(bf," \n");
- X }
- X lncnt++;
- X if(*bf=='\t'||*bf=='\n')
- X ch=' ', cp=bf;
- X else
- X ch= *bf, cp=bf+1;
- X switch(ch){
- X case'-':if(!ol--) goto bad;
- X printf("- %s",cp);
- X break;
- X case'=':ch=' ';
- X case' ':if(!ol--) goto bad;
- X printf(" %s",cp);
- X case'+':if(!nl--) goto bad;
- X ln = (struct Ln*)malloc(sizeof(*ln)+strlen(cp));
- X if(!ln) ERR("Out of memory!\n");
- X ln->lk=0, ln->t=ch, strcpy(ln->s,cp);
- X h->lk=ln, h=ln;
- X break;
- X default:
- X bad: fprintf(stderr,"Malformed unidiff at line %ld: ",lncnt);
- X ERR(bf);
- X }
- X }
- X printf("--- %ld,%ld ----\n",ns,ne);
- X for(ln=r.lk;ln;ln=h){
- X printf("%c %s",ln->t,ln->s);
- X h=ln->lk;
- X free(ln);
- X }
- X}
- X}
- END_OF_FILE
- if test 1338 -ne `wc -c <'unipatch.c'`; then
- echo shar: \"'unipatch.c'\" unpacked with wrong size!
- fi
- # end of 'unipatch.c'
- fi
- if test -f 'util.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'util.h'\"
- else
- echo shar: Extracting \"'util.h'\" \(1259 characters\)
- sed "s/^X//" >'util.h' <<'END_OF_FILE'
- X/* $Header: util.h,v 4.3.3.1 91/01/16 03:41:51 davison Trn $
- X *
- X * $Log: util.h,v $
- X * Revision 4.3.3.1 91/01/16 03:41:51 davison
- X * Added optional prototyping.
- X *
- X * Revision 4.3 85/05/01 11:51:58 lwall
- X * Baseline for release with 4.3bsd.
- X *
- X */
- X
- XEXT bool waiting INIT(FALSE); /* are we waiting for subprocess (in doshell)? */
- XEXT int len_last_line_got INIT(0);
- X /* strlen of some_buf after */
- X /* some_buf = get_a_line(bufptr,buffersize,fp) */
- X
- X/* is the string for makedir a directory name or a filename? */
- X
- X#define MD_DIR 0
- X#define MD_FILE 1
- X
- Xvoid util_init ANSI((void));
- Xint doshell ANSI((char *,char *));
- Xchar *safemalloc ANSI((MEM_SIZE));
- Xchar *saferealloc ANSI((char *,MEM_SIZE));
- Xchar *safecpy ANSI((char *,char *,int));
- Xchar *safecat ANSI((char *,char *,int));
- Xchar *cpytill ANSI((char *,char *,int));
- Xchar *instr ANSI((char *,char *));
- X#ifdef SETUIDGID
- X int eaccess ANSI((char *,int));
- X#endif
- Xchar *getwd ANSI((char *));
- Xchar *get_a_line ANSI((char *,int,FILE *));
- Xchar *savestr ANSI((char *));
- Xint makedir ANSI((char *,int));
- Xvoid setenv ANSI((char *,char *));
- Xint envix ANSI((char *));
- Xvoid notincl ANSI((char *));
- Xchar *getval ANSI((char *,char *));
- Xvoid growstr ANSI((char **,int *,int));
- Xvoid setdef ANSI((char *,char *));
- END_OF_FILE
- if test 1259 -ne `wc -c <'util.h'`; then
- echo shar: \"'util.h'\" unpacked with wrong size!
- fi
- # end of 'util.h'
- fi
- echo shar: End of archive 14 \(of 14\).
- cp /dev/null ark14isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 14 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-